<!--#include file="../inc/Yidacms.gbk.asp" -->
<!--#include file="../inc/Yidacms.db.asp" -->
<!--#include file="../inc/Yidacms.function.asp" -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>欢迎使用 YidaCMS JS ... ...</title>
<link href="../t/YIQI-UI/YIQI-UI.min.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="YIQI-UI">
<div class="" style="width:800px; margin:0 auto;">
<%
Dim steps : steps = Request("steps")
Dim file

set fs = server.createobject("scripting.filesystemobject")
file = server.mappath("lock.txt")
if fs.fileexists(file) then
	response.write "<p class='text-c' style='margin-top:200px;'>重新安装，请手动删除install目录下的lock.txt文件！</p>"
	response.end
end if

If steps = "" Then steps = "step9" End If
Select Case steps
    Case "step1"
        session("step1") = "step1"
        Call step1
    Case "step2"
        session("step2") = "step2"
        Call step2
    Case "step3"
        session("step3") = "step3"
        Call step3	
    Case "step4"
        session("step4") = "step4"
        Call step4		
    Case "step5"
        session("step5") = "step5"
        Call step5		
    Case "step6"
        session("step6") = "step6"
        Call step6	
    Case "step7"
        session("step7") = "step7"
        Call step7		
    Case "step8"
        session("step8") = "step8"
        Call step8
    Case "step9"
        session("step9") = "step9"
        Call step9			
End Select

Sub step9()
%>
<p class="text-c" style="margin-top:200px;">感谢使用YidaCMS JS 系列企业建站系统</p>
<p class="mt-20 text-c"><a href="install.asp?steps=step8" class="btn btn-success radius-10 pd-15">开始安装ASP+ACCESS版</a></p>
<%
End Sub
Sub step8()
%>


<p>当前版本为：<span class="btn btn-primary-o radius-6 pl-10 pr-10 pt-5 pb-5"><%=Version%></span> 更新日期为：<span class="btn btn-primary-o radius-6 pl-10 pr-10 pt-5 pb-5"><%=Versiondate%></span></p>
<p>请遵守以下协议:</p>
<p>注:YidaCMS JS 以下简称为:易达企业建站系统或易达CMS</p>
<p>一、易达企业建站系统在没有授权下，页面及网页标题中的Powered by YidaCms版权标志不可以删除。不可以用于商业用途中，<br /><span class="pl-30">一但发现将侵害易达版权后果自负。如在没有授权下，可以用于个人使用。</span></p>
<p>二、使用本产品进行商业用途或去掉前后台版权标志的用户，需要 <a href="https://www.ourphp.net/?cn-about-24.html" target="_blank"><span class="btn btn-danger-o radius-6 pl-10 pr-10 pt-5 pb-5">购买商业授权</span></a>。</p>
<p>三、如果你使用本程序进行2次开发或者制作模版等，必须遵循国际LGPL开源协议，也就是说，你没有购买我们的商业授权的话，<br /><span class="pl-30">你是需要公开这些代码和模版，供大家使用交流的。</span></p>
<p>四、免费开源不等于让你拿去随意使用，我们不是慈善事业。请尊重知识产权(软件著作权登记号:2012SR001955)!</p>
<p>五、免责声明</p>
<p class="pl-30">1.本软件及所附带的文件是作为不提供任何明确的或隐含的赔偿或担保的形式提供的。</p>
<p class="pl-30">2.用户出于自愿而使用本软件，您必须了解使用本软件的风险，我们不承担任何因使用本软件而产生问题的相关责任。</p>
<p class="text-c f-16 f-f00">如果您不同意以上协议，请不要使用易达企业建站系统。并立刻删除!</p>
<p class="text-c mt-40"><a href="install.asp?steps=step1" class="btn btn-success radius-10 pd-15">同意并安装</a></p>
<%
End Sub
Sub step1()
		set rs = server.createobject("adodb.recordset")
		sql="select Webtitle,weburl from shuaiweb_system where id = 1"
		rs.open sql,dbok,1,1
		
		Dim Webtitle : Webtitle = rs(0)
		Dim weburl : weburl = rs(1)

		Dim Url,Key,WwwName 
		Url = Request.ServerVariables("SERVER_NAME") 
		If InStr(Url,"") > 0 Then 
		Key = Split(Url,"") 
		WwwName = Key(0) 
		WwwName = Replace(WwwName,"http://","www")
		end if
		
		rs.close
%>

<form id="form1" name="form1" method="POST" action="install.asp?steps=step2">
<table class="table table-border table-hover" >
		  <tr>
			<td><span class="btn btn-danger-o radius-6 pl-10 pr-10 pt-5 pb-5">创建网站标题和地址</span></td>
		  </tr>
		  <tr>
			<td>
			<div style="width:500px; height:40px;">
				<div class="f-l text-c" style="width:100px; background: #D4D4D4; height:40px; line-height:40px; color:#666">网站标题</div>
				<div class="f-l"><input name="webtitle" type="text" id="webtitle" value="<%=webtitle%>" placeholder="输入内容" class="pl-15" style="width:325px; height:40px; border:none" />&nbsp;&nbsp;<font color=red>(必填)</font></div>
			</div>
			</td>
		  </tr>
		  <tr>
            <td>
			<div style="width:500px; height:40px;">
				<div class="f-l text-c" style="width:100px; background: #D4D4D4; height:40px; line-height:40px; color:#666">网站标题</div>
				<div class="f-l"><input name="weburl" type="text" id="weburl" value="<%=weburl%>" placeholder="输入内容" class="pl-15" style="width:325px; height:40px; border:none" />&nbsp;&nbsp;<font color=red>(很重要)</font></div>
			</div>
            
            <p class="mt-30 f-14">1.网站地址必须以 http:// 开头 — 用 / 结尾 <br />2.自动检测的域名是：http://<%=WwwName%>/<br />3.注：( 如果程序放在二级目录使用，请输入目录名以 / 结尾。例如:http://<%=WwwName%>/二级目录名/ )</p>
            
            </td>
		  </tr>
 	 <tr>
    <td>
      <input type="submit" name="Submit" value="下一步" class="btn btn-success radius-10 pd-15" /></td>
  </tr>
</table>
</form>

<%
End Sub
Sub step2()

		if len(trim(request.Form("webtitle")))<1 then
		response.write ("<script language=javascript> alert('网站标题必填且不能少于1个字符！');history.go(-1);</script>")
		response.end
		end if
		  
		if len(trim(request.Form("weburl")))<1 then
		response.write ("<script language=javascript> alert('网站网址不能为空，且不少于1个字符！');history.go(-1);</script>")
		response.end
		end if
%>
<table width="800" border="0" align="center" cellpadding="10" cellspacing="10" style="font-size:14px;">
  <tr>
    <td><p align="center" style="font-size:16px; color:#FF0000; font-weight:600;">安装失败！</p>
      <p>原因可能是你所存放网站程序的硬盘是NTFS分区，最简单的解决办法是用记事本打开/inc/db.asp文件，</p>
      <p>把TXW_install = &quot;open&quot;改为TXW_install = &quot;close&quot; 然后关闭浏览器，在从新打开直接进入后台可省略安装这一步，但这不是一个有效的解决办法． </p>
      <p>因为硬盘如果是NTFS分区的话，那么每一个网站目录都要添写IIS权限．这是必须的！只要有这样才能发挥好ASP的作用． </p>
      <p>解决办法1:把程序移动到FAT32分区中，在FAT32分区的硬盘中是不须要写权限的．</p>
    <p>解决办法2:给NTFS分区下的网站目录添写IIS权限！<a href="http://www.ourphp.net/club/forum.php?mod=viewthread&tid=1283" target="_blank">查看添写权限的方法</a></p></td>
  </tr>
</table>
<%
		exec = "select * from shuaiweb_system where id = 1" 
		set rs = server.createobject("adodb.recordset")
		rs.open exec,dbok,1,3
		rs("webtitle") = filter_Str(request.form("webtitle"))
		rs("weburl") = filter_Str(request.form("weburl"))	
		rs.update
		rs.close
		response.redirect "yidacms_html.asp?html=ok1"
		
End Sub
Sub step3()

		exec = "select * from shuaiweb_system where id = 1" 
		set rs = server.createobject("adodb.recordset")
		rs.open exec,dbok,1,1
		Dim weburl : weburl = rs("weburl")
		rs.close
		
		response.write " <table class='table table-border table-hover'>"&vbcrlf
		response.write " <form id=""form1"" name=""form1"" method=""post"" action=""install.asp?steps=step4"">"&vbcrlf
		response.write "   <tr>"&vbcrlf
		response.write "   <td colspan=""2""><span class='btn btn-danger-o radius-6 pl-10 pr-10 pt-5 pb-5'>修改管理员目录</span></td>"&vbcrlf
		response.write "   </tr>"&vbcrlf
		response.write "   <tr>"&vbcrlf
		response.write "     <td width=""140"">默认的管理员目录是：</td><td>"&weburl&"admin&nbsp;&nbsp;为了安全,请修改你的管理员目录!</td>"&vbcrlf
		response.write "   </tr>"&vbcrlf						
		response.write "   <tr>"&vbcrlf
		response.write "     <td style=""text-align:right""><font color=red>*</font> 修改为：</td>"&vbcrlf
		response.write "     <td>" & weburl & " <input class='border pd-5 radius-7' style='width:100px; height:15px;' name=""adminpath"" id=""adminpath"" type=""text"" onkeyup=""value=value.replace(/[^\w\.\/]/ig,'')""> /</td>"&vbcrlf
		response.write "   </tr>"&vbcrlf
		response.write "   <tr>"&vbcrlf
		response.write "     <td></td>"&vbcrlf
		response.write "     <td><font color=red>!!! 只需要输入新的后台登录目录名，可以为英文或数字或英文数字组合。不可以为中文或符号<br />为了网站安全不可以使用 admin 或 admin888 等常用的名称来定义管理员目录！</font></td>"&vbcrlf
		response.write "   </tr>"&vbcrlf
		response.write "   <tr>"&vbcrlf
		response.write "     <td>&nbsp;</td>"&vbcrlf
		response.write "     <td><input type=""submit"" name=""Submit"" value=""下一步"" class=""btn btn-success radius-10 pd-15""/></td>"&vbcrlf
		response.write "   </tr>"&vbcrlf
		response.write "  </form>"&vbcrlf
		response.write " </table>"&vbcrlf
		
End Sub
Sub step4()
		if len(trim(request.Form("adminpath")))<1 then
		response.write ("<script language=javascript>alert('目录名必填且不能少于1个字符！');history.go(-1);</script>")
		response.end
		end if

		if trim(request.Form("adminpath"))="admin" then
		response.write ("<script language=javascript>alert('为了网站安全，请不要使用admin来做为新的后台目录');history.go(-1);</script>")
		response.end
		end if
		
		if trim(request.Form("adminpath"))="admin" or trim(request.Form("adminpath"))="bianji" or trim(request.Form("adminpath"))="html" or trim(request.Form("adminpath"))="httpd" or trim(request.Form("adminpath"))="images" or trim(request.Form("adminpath"))="inc" or trim(request.Form("adminpath"))="t" or trim(request.Form("adminpath"))="template" or trim(request.Form("adminpath"))="yidacmsDB" or trim(request.Form("adminpath"))="uploadclass" or trim(request.Form("adminpath"))="uploadimg" or trim(request.Form("adminpath"))="user" or trim(request.Form("adminpath"))="wap" or trim(request.Form("adminpath"))="install" or trim(request.Form("adminpath"))="api" or trim(request.Form("adminpath"))="about" or trim(request.Form("adminpath"))="news" or trim(request.Form("adminpath"))="products" or trim(request.Form("adminpath"))="photo" or trim(request.Form("adminpath"))="video" or trim(request.Form("adminpath"))="book" or trim(request.Form("adminpath"))="down" then
		response.write ("<script language=javascript>alert('"&request.Form("adminpath")&"该目录已存在，请换其它目录名称!');history.go(-1);</script>")
		response.end
		end if

		exec="select * from book_management where id = 1" 
		set rs=server.createobject("adodb.recordset")
		rs.open exec,dbok,1,3
		rs("adminpath") = trim(request.form("adminpath"))
		rs.update
		rs.close

		set fs=server.CreateObject("scripting.filesystemobject")
		set fw=fs.OpenTextFile(server.MapPath("../robots.txt"),2,true)
		fw.write "#"&vbcrlf
		fw.write "# robots.txt for YidaCMS! "&Version&"/"&Versiondate&""&vbcrlf
		fw.write "#"&vbcrlf
		fw.write ""&vbcrlf
		fw.write "User-agent: *"&vbcrlf
		fw.write "Disallow: /api/"&vbcrlf
		fw.write "Disallow: /bianji/"&vbcrlf
		fw.write "Disallow: /inc/"&vbcrlf
		fw.write "Disallow: /install/"&vbcrlf
		fw.write "Disallow: /template/"&vbcrlf
		fw.write "Disallow: /uploadclass/"&vbcrlf
		fw.write "Disallow: /yidacmsDB/"&vbcrlf
		fw.write "Disallow: /Shop_cart.asp"&vbcrlf
		fw.write "Disallow: /buy_settlement.asp"&vbcrlf
		fw.close
		set fw=nothing
		
		response.redirect "install.asp?steps=step5&adminurl="&request.Form("adminpath")&""
End Sub
Sub step5()

		Dim adminurl : adminurl = request("adminurl")
		
		response.write "<table class='table table-border table-hover'>"&vbcrlf
		response.write "  <tr>"&vbcrlf
		response.write "    <td colspan='2'><div align='center'><span class='btn btn-danger-o radius-6 pl-10 pr-10 pt-5 pb-5'>网站安装成功！</span></div></td>"&vbcrlf
		response.write "  </tr>"&vbcrlf
		response.write "  <tr>"&vbcrlf
		response.write "    <td><div align='right'>管理员登录地址：</div></td>"&vbcrlf
		response.write "    <td><p>原来的管理员后台登录地址："&webpath&"admin/index.asp&nbsp;&nbsp;<img src='images/delete_16x16.gif' border='0'></p>"&vbcrlf
 		response.write "   <p style='color:#CC0000;'>您新的管理员登录地址："&webpath&adminurl&"/index.asp&nbsp;&nbsp;<img src='images/ok_16x16.gif' border='0'>&nbsp;&nbsp;<a href='../"&adminurl&"/index.asp' target='_blank'>现在登陆?</a> </p></td>"&vbcrlf
		response.write "  </tr>"&vbcrlf
		response.write "  <tr>"&vbcrlf
		response.write "    <td><div align='right' class='btn radius-10 btn-warning-o pd-15'>后台默认登录账号密码：</div></td>"&vbcrlf
		response.write "    <td><p>默认登录账号：admin</p>"&vbcrlf
		response.write "    <p>默认登录密码：admin888</p>"&vbcrlf
		response.write "    <p>默认口令码：12345 （口令码可以打开 "&webpath&"inc/Yidacms.db.asp 修改） </p></td>"&vbcrlf
		response.write "  </tr>"&vbcrlf
		response.write "  <tr>"&vbcrlf
		response.write "    <td><div align='right'>手机访问应用：</div></td>"&vbcrlf
		response.write "    <td>http://你的域名/wap&nbsp;&nbsp;<img src='images/ok_16x16.gif' border='0'></td>"&vbcrlf
		response.write "  </tr>"&vbcrlf
		response.write "  <tr>"&vbcrlf
		response.write "    <td><div align='right'>微信访问应用：</div></td>"&vbcrlf
		if TXW_weixin = "open" then
		response.write "    <td><img src='images/ok_16x16.gif' border='0'></td>"&vbcrlf
		elseif TXW_weixin = "close" then
		response.write "    <td><img src='images/delete_16x16.gif' border='0'></td>"&vbcrlf
		end if
		response.write "  </tr>"&vbcrlf
		response.write "  <tr>"&vbcrlf
		response.write "    <td><div align='right'>提醒：</div></td>"&vbcrlf
		response.write "    <td>为了安全请您将安装程序目录&nbsp;"&webpath&"install/&nbsp;也删掉！</td>"&vbcrlf
		response.write "  </tr>"&vbcrlf
		response.write "  <tr>"&vbcrlf
		response.write "    <td><div align='right'>建议：</div></td>"&vbcrlf
		response.write "    <td>建议系统启动静态模式(后台->全局->条件设置)，可以提升网站速度和安全!</td>"&vbcrlf
		response.write "  </tr>"&vbcrlf
		response.write "</table>"&vbcrlf

		Set fso=Server.CreateObject( "scripting.filesystemobject") 
		Set folder=fso.getfolder(Server.Mappath( "../admin")) 
		folder.name = adminurl
		
		Dim Content,Lines,xrfile
		xrfile = "../inc/Yidacms.db.asp"
		Set fs = Server.CreateObject("Scripting.FileSystemObject")
		File = Server.MapPath(xrfile)
		Set txt = fs.OpenTextFile(File) 
		
		If Not txt.atEndOfStream Then
		Content = txt.ReadAll
		Lines = Replace(Content, "TXW_install = ""open""", "TXW_install = ""close""")
		'Response.Write Lines
		End If
		
		set fso = server.CreateObject("scripting.filesystemobject") 
		Set txtr = fso.createtextfile(server.mappath(xrfile))
		txtr.writeline(Lines)
		
		set fso = server.CreateObject("scripting.filesystemobject") 
		Set txtr = fso.createtextfile(server.mappath("lock.txt"))
		txtr.writeline ("如果需要重新安装，可把这个文件删除。否侧不要删除这个文件！")
		txtr.writeline ("www.YidaCMS.com")
End Sub
%>
</div>
</div>
</body>
</html>